﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class Global {
    //布局元件名称
    public static string[] layout_component_name =                
     {
       "duct_top","duct_middle","duct_bottom","duct_left",
       "duct_right","rail_top","rail_middle","rail_bottom",
       "Q1","FU1_1","FU1_2","FR1","KM1","KM2","X2_1","X2_2","X2_3","X2_4",
       "X1_1","X1_2","X1_3","X1_4","H1","H2","H3","S1","S2","S3"
    };

    //导线名称
    public static string[] wires_name =
    {
      "L1_1","L1_2","L1_3","L1_4","L1_5","L1_6",
      "L2_1","L2_2","L2_3","L2_4","L2_5","L2_6",
      "L3_1","L3_2","L3_3","L3_4","L3_5","L3_6",
      "L4_1","L5_1","L5_2","L5_3","L5_4","L5_5",
      "L5_6","L5_7","L5_8","L5_9","L6_1","L6_2",
      "L6_3","L6_4","L6_5","L6_6","L6_7","L7_1",
      "L7_2","L7_3","L7_4","L7_5","L7_6","L7_7",
      "L7_8","L7_9","L7_10"
     };
    
    //线缆名称
    public static string[] cables_name =
    {
        "CABLE1","CABLE2"
    };

    //布线相关对象名交错数组 0-原理导线，1-导线 2-端点1 3-端点2
    public static string[][] WiringObjectsName = {
        new string[] { "SchL1_1", "L1_1","X2_1_1","Q1_point1"},
        new string[] {"SchL1_2","L1_2","Q1_point2","KM1_L1"},
        new string[] {"SchL1_3","L1_3","KM1_T1","FR1_L1"},
        new string[] {"SchL1_4","L1_4","FR1_T1","X1_1_1"},
        new string[] {"SchL1_5","L1_5","KM1_L1","KM2_L3"},
        new string[] {"SchL1_6","L1_6","KM2_T3","KM1_T3"},
        new string[] {"SchL2_1","L2_1","X2_2_1","Q1_point3"},
        new string[] {"SchL2_2","L2_2","Q1_point4","KM1_L2"},
        new string[] {"SchL2_3","L2_3","KM1_T2","FR1_L2"},
        new string[] {"SchL2_4","L2_4","FR1_T2","X1_2_1"},
        new string[] {"SchL2_5","L2_5","KM1_L2","KM2_L2"},
        new string[] {"SchL2_6","L2_6","KM2_T2","KM1_T2"},
        new string[] {"SchL3_1","L3_1","X2_3_1","Q1_point5"},
        new string[] {"SchL3_2","L3_2","Q1_point6","KM1_L3"},
        new string[] {"SchL3_3","L3_3","KM1_T3","FR1_L3"},
        new string[] {"SchL3_4","L3_4","FR1_T3","X1_3_1"},
        new string[] {"SchL3_5","L3_5","KM1_L3","KM2_L1"},
        new string[] {"SchL3_6","L3_6","KM2_T1","KM1_T1"},
        new string[] {"SchL4_1","L4_1","X1_4_1","X2_4_1"},
        new string[] {"SchL5_1","L5_1","Q1_point4","FU2_point1"},
        new string[] {"SchL5_2","L5_2","FU2_point2","FR1_NC1"},
        new string[] {"SchL5_3","L5_3","FR1_NC2","S3_1"},
        new string[] {"SchL5_4","L5_4","S3_2","S1_3"},
        new string[] {"SchL5_5","L5_5","S1_4","KM2_21"},
        new string[] {"SchL5_6","L5_6","KM2_22","KM1_A1"},
        new string[] {"SchL5_7","L5_7","KM1_A2","KM2_A2"},
        new string[] {"SchL5_8","L5_8","KM2_A2","FU1_point2"},
        new string[] {"SchL5_9","L5_9","FU1_point1","Q1_point6"},
        new string[] {"SchL6_1","L6_1","S1_3","KM2_13"},
        new string[] {"SchL6_2","L6_2","KM1_13","KM2_13"},
        new string[] {"SchL6_3","L6_3","KM1_14","KM2_21"},
        new string[] {"SchL6_4","L6_4","S2_3","S3_2"},
        new string[] {"SchL6_5","L6_5","S2_4","KM2_14"},
        new string[] {"SchL6_6","L6_6","KM2_14","KM1_21"},
        new string[] {"SchL6_7","L6_7","KM1_22","KM2_A1"},
        new string[] {"SchL7_1","L7_1","FR1_NC2","KM2_43"},
        new string[] {"SchL7_2","L7_2","KM2_43","KM1_31"},
        new string[] {"SchL7_3","L7_3","KM1_43","KM1_31"},       
        new string[] {"SchL7_4","L7_4","KM2_31","KM1_32"},
        new string[] {"SchL7_5","L7_5","KM2_32","H3_X1"},
        new string[] {"SchL7_6","L7_6","KM1_44","H1_X1"},
        new string[] {"SchL7_7","L7_7","KM2_44","H2_X1"},
        new string[] {"SchL7_8","L7_8","H3_X2","H1_X2"},
        new string[] {"SchL7_9","L7_9","H3_X2","H2_X2"},
        new string[] {"SchL7_10","L7_10","H1_X2","KM1_A2"}
    };

    //电动机仿真运行状态参数
    public static int RunStatus=0;
    public static bool Q1Status=false;
    
    //初始化电动机仿真运行状态参数
    public static void InitMotoRun()
    {
        RunStatus = 0;
        Q1Status = false;
    }

    /*实训考核参数*/
    public static int Score = 100;
    public static int LayoutErrorNum = 0;
    public static int WirlingErrorNum = 0;
   // public static int ErrorNum = 0;

    public static void InitExam()
    {
        Score = 100;
        LayoutErrorNum = 0;
        WirlingErrorNum = 0;
       // ErrorNum = 0;
    }
}
